import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/pages/home/Home'
import About from '@/pages/about/About'
import Product from '@/pages/product/Product'
import Assets from '@/pages/assets/Assets'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home
    },
    {
      path: '/about',
      name: 'About',
      component: About
    },
    {
      path: '/product',
      name: 'Product',
      component: Product
    },
    {
      path: '/assets',
      name: 'Assets',
      component: Assets
    }
  ],
  // 控制滚动条益处
  scrollBehavior (to, from, savedPosition) {
    return { x: 0, y: 0 }
  }
})
